#对账管理
from selenium.webdriver.common.by import By

byid = By.ID
byname = By.NAME
bycname = By.CLASS_NAME
bytname = By.TAG_NAME
bylink = By.LINK_TEXT
bycss = By.CSS_SELECTOR
byxpath = By.XPATH
byparriallike = By.PARTIAL_LINK_TEXT

url = "http://10.59.9.8:7007/boss/"

# 登录界面元素配置信息
class LoginPageElements:
    """登录页面元素定位配置（优化后）"""
    # 账号
    login_username = byxpath, '//*[@id="form1"]/div[2]/ul[1]/li[2]/input'
    # 页面信息（会员登录）
    #密码
    login_pwd = byxpath,'//*[@id="form1"]/div[2]/ul[2]/li[2]/input'
    # login_dy_text = bycname, 'reg-new'
    # login_username = byname, 'username'
    # login_pwd = byname, 'password'
    login_btn = byxpath, '/html/body/div[1]/div[2]/div[1]/form/div[3]/input'
    login_dy_text = byxpath,'/html/body/div[1]/div[2]/div[2]/div[1]/h2'  #断言  系统菜单


login_pe = LoginPageElements()




# 首页界面元素配置信息
class dzElements:
    #对账管理菜单
    dzmenu_loc = byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[13]/h2'
    #对账差错
    dzcx_loc = byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[14]/ul/li[1]/div/a'
    #对账批次
    dzpx_loc = byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[14]/ul/li[2]/div/a'
    #对账缓冲池
    dzhc_loc = byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[14]/ul/li[3]/div/a'
    #账单时间
    dzzd_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr/td[1]/input'
    #年份下拉框
    year_select_loc = byname,'year'
    #月份下拉框
    month_select_loc = byname,'month'
    #日期
    day_elect_loc = bycname,'slt '
    #日期确定按钮
    sure_loc = bycname,'okBut'
    #搜索按钮
    search_btn = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[7]/div[1]/form/div/table/tbody/tr/td[2]/div/div/button'
    #断言 ---一共有两条数据 2024-12-07
    dy = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[7]/div[2]/div[3]/div[1]/span[2]/a'



dz_pe = dzElements()


